package com.learn.english.controller;

import com.learn.english.domain.R;
import com.learn.english.model.ro.CourseInfoRo;
import com.learn.english.service.ICourseInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TISNIW
 * @version 1.0
 * @desc
 */
@RestController
@RequestMapping("/course/info")
@Slf4j
public class CourseInfoController {
    @Autowired
    private ICourseInfoService courseInfoService;
    @GetMapping("/detailByCourseId")
    public R<CourseInfoRo> detail(@RequestParam Integer courseId) {
        return R.ok(courseInfoService.detail(courseId));
    }


}
